import Head from 'next/head'
import React from 'react'
import '@/pages/common.less'
class Header extends React.Component {
  render() {
    let { title, description, url, image, siteName, type } = this.props
    title = title ? `${title} | manga.ren` : 'manga.ren'
    siteName = siteName || title
    type = type || 'website'
    return (
      <Head>
        <meta name="viewport" content="initial-scale=1.0, width=device-width" />
        <link rel="icon" href="/static/favicon.ico" type="image/x-icon" />
        <title>{title}</title>
        <meta name="description" content={description} />
        <meta property="og:site_name" content={siteName} />
        <meta property="og:type" content={type} />
        <meta property="og:title" content={title} />
        <meta property="og:description" content={description}/>
        <meta property="og:image" content={image} />
        <meta property="og:url" content={url} />
        <meta name="twitter:title" content={title} />
        <meta name="twitter:description" content={description}/>
        <meta name="twitter:image" content={image} />
        <meta name="twitter:url" content={url} />
        <meta name="twitter:card" content="summary"></meta>
      </Head>
    )
  }
}

export default Header
